#!/usr/bin/env bash
platforms=(
    # "windows/amd64"
    # "windows/386"
    "linux/amd64"
    # "linux/386"
    # "linux/arm64"
    # "linux/arm"
    )
for platform in "${platforms[@]}"
do
    platform_split=(${platform//\// })
    GOOS=${platform_split[0]}
    GOARCH=${platform_split[1]}
  
    output_name='.out/hostip2dns-'$GOOS'-'$GOARCH
    if [ $GOOS = "windows" ]; then
        output_name+='.exe'
    fi
  
    env GOOS=$GOOS GOARCH=$GOARCH go build -o $output_name
done
